package bookshop.service;

import java.util.List;

import bookshop.dao.DaoFactory;
import bookshop.dao.OrderDao;
import bookshop.domain.OrderInfo;
import bookshop.domain.OrderItem;
import bookshop.domain.SaleBook;
import bookshop.domain.ShoppingCart;
import bookshop.service.helper.OrderQueryHelper;
import bookshop.utils.Page;

public interface OrderService {
	
	
	
	//添加订单信息
	void SavaOrderInfo(OrderInfo orderInfo);
	
	//将购物车里的信息保存到Order_item中
	void saveAllOrderItem(ShoppingCart cart,String orderId);
	
	//根据查询条件以及分页查询订单信息
	Page loadOrdersByCondition(OrderQueryHelper helper, Page page);
	
	//根据订单号取得相应的order_item
	List<OrderItem> GetOrderItemByOrderId(String orderId);
	

	//删除有关订单的所有信息
	void DelOrder(String orderId);
	
	//更新订单
	void UpdateOrder(OrderInfo orderInfo);
	
	//根据订单号取出订单信息
	OrderInfo GetOrderByOrderId(String orderId);
	
	
	List<SaleBook> GetSaleBook();
}
